<include file="public@header" />
</head>
<body>
	<div class="lyear-layout-web">
        <div class="lyear-layout-container">
            <!--页面主要内容-->
            <main class="lyear-layout-content">
              
                <div class="container-fluid">
                
                    <div class="row">
                       <div class="col-md-12">
                            <div class="card">
								<ul class="nav nav-tabs">
									<li><a href="{:url('link/index')}">{:lang('ADMIN_LINK_INDEX')}</a></li>
									<li class="active"><a href="{:url('link/add')}">{:lang('ADMIN_LINK_ADD')}</a></li>
								</ul>
								<div class="card-body">
									<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('link/addPost')}">
										<div class="form-group">
											<label for="input-name" class="col-sm-2 control-label">名称<span class="form-required">*</span></label>
											<div class="col-md-6 col-sm-10">
												<input type="text" class="form-control" id="input-name" name="name">
											</div>
										</div>
										<div class="form-group">
											<label for="input-url" class="col-sm-2 control-label">链接地址<span class="form-required">*</span></label>
											<div class="col-md-6 col-sm-10">
												<input type="text" class="form-control" id="input-url" name="url">
											</div>
										</div>
										<div class="form-group">
											<label for="input-image" class="col-sm-2 control-label">图标</label>
											<div class="col-md-6 col-sm-10">
												<input type="text" class="form-control" id="input-image" name="image"> 
												<a href="javascript:uploadOneImage('图片上传','#input-image');">上传图片</a>
											</div>
										</div>
										<div class="form-group">
											<label for="input-target" class="col-sm-2 control-label">打开方式</label>
											<div class="col-md-6 col-sm-10">
												<select class="form-control" name="target" id="input-target">
													<foreach name="targets" item="vo">
													<option value="{$key}">{$vo}</option>
													</foreach>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label for="input-description" class="col-sm-2 control-label">描述</label>
											<div class="col-md-6 col-sm-10">
												<textarea class="form-control" name="description" id="input-description" ></textarea>
											</div>
										</div>
										<div class="form-group">
											<div class="col-sm-offset-2 col-sm-10">
												<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
												<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
											</div>
										</div>
									</form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>
<script src="__TMPL__/public/assets/js/admin.js"></script>
</body>
</html>